﻿using Acme.BookStore.PurchaseDto.CustomergoodsDto;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.AspNetCore.Mvc;

namespace Acme.BookStore.Controllers
{
    [Route("api/app/customergoods")]
    [ApiController]
    public class CustomergoodsController : AbpController
    {
        private readonly ICustomergoodsService _service;
        public CustomergoodsController(ICustomergoodsService service)
        {
            _service = service;
        }

        [HttpPost("by-conditions")]
        public Task<PagedResultDto<CustomergoodsDto>> GetListByConditionsAsync([FromBody] CustomgoodsQueryDto input)
            => _service.GetListByConditionsAsync(input);
    }
}
